package com.epoch.servicetest.dao;

import com.epoch.servicetest.test.StuWrong;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 *
 * @author Seven
 * @date 2021/12/14
 */
@Mapper
@Repository
public interface StuWrongDao {
    /**
     * 学生错题 添加
     * @param stuWrong
     * @return
     */
    int addStuWrong(StuWrong stuWrong);

    /**
     * 获取错题 by csId
     * @param csId
     * @return
     */
    List<StuWrong> getStuWrongByCsId(@Param("csId") Integer csId);

    /**
     * 修改错题的信息 错题更新
     * @param stuWrong
     * @return
     */
    int updateStuWrongByQuestionItemIdByCsId(StuWrong stuWrong);

    /**
     * 获取错题 by csId questionItemId
     * @param csId
     * @param questionItemId
     * @return
     */
    StuWrong getStuWrongByCsIdQuestionItemId(@Param("csId") Integer csId, @Param("questionItemId") Integer questionItemId);
}
